package com.heima.article.controller;

import com.heima.article.entity.ApAuthor;
import com.heima.article.service.IApAuthorService;
import com.heima.common.dto.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * APP文章作者信息表 前端控制器
 */
@RestController
@RequestMapping("/api/v1/author")
@Api(tags = "APP文章作者信息表接口")
@CrossOrigin
public class ApAuthorController {
    @Autowired
    private IApAuthorService apAuthorService;

    @PostMapping
    @ApiOperation(value = "saveApAuthor",notes = "保存文章作者")  // value指名称  notes 备注
    @ApiModelProperty(name = "entity",dataType = "ApAuthor",required = true)
    public ResponseResult<ApAuthor> saveApAuthor(@RequestBody ApAuthor entity){
        return apAuthorService.saveApAuthor(entity);
    }
}
